package com.monkeygroup.mygoplus.view.home.activity;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import android.widget.LinearLayout;

import com.monkeygroup.mygoplus.R;
import com.monkeygroup.mygoplus.base.BaseActivity;

/**
 * Created by cumt on 2017/5/26.
 */

public class PubliseedChooseActivity extends BaseActivity implements View.OnClickListener {


    public static void gotoActivity(Activity activity) {
        Intent intent = new Intent(activity,
                PubliseedChooseActivity.class);

        activity.startActivity(intent);
    }

    private ImageView imgBack;
    private TextView txtTitle;
    private TextView txtTop;

    private LinearLayout layout_shortcut,llMySell,llMyRent,llMyModify;

    @Override
    public void onClick(View v) {

    }

    @Override
    public void setContentView() {
        setContentView(R.layout.published_choose);
    }

    @Override
    public void initView() {

        imgBack = (ImageView) findViewById(R.id.img_back);
        txtTitle = (TextView) findViewById(R.id.txt_title);
        layout_shortcut= (LinearLayout) findViewById(R.id.layout_shortcut);
        layout_shortcut.setVisibility(View.INVISIBLE);
        txtTitle.setText("新建物件");

        llMySell= (LinearLayout) findViewById(R.id.ll_my_sell);
        llMyRent= (LinearLayout) findViewById(R.id.ll_my_rent);
        llMyModify= (LinearLayout) findViewById(R.id.ll_my_modify);

    }

    @Override
    public void setListener() {

    }

    @Override
    public void doEvent() {

        imgBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        llMySell.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PublishedFirstActivity.gotoActivity(PubliseedChooseActivity.this,"2");
            }
        });
        llMyRent.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PublishedFirstActivity.gotoActivity(PubliseedChooseActivity.this,"1");
            }
        });
        llMyModify.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PublishedMineActivity.gotoActivity(PubliseedChooseActivity.this);

            }
        });

    }
}
